﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucGetByCate.ascx.cs"
    Inherits="TTMarketing.UserControl.SanPham.ucGetByCate" %>
<asp:DataList ID="dlProductByCate" runat="server" DataSourceID="osdCate" Width="100%">
    <ItemTemplate>
        <div id="com-main-left-title">
            <asp:Label ID="NameLabel" runat="server" Text='<%# Eval("Name") %>' /></div>
    </ItemTemplate>
</asp:DataList>
<asp:ObjectDataSource ID="osdCate" runat="server" SelectMethod="getById" TypeName="TTBusiness.ClassDB.clsBSCateProduct">
    <SelectParameters>
        <asp:QueryStringParameter Name="id" QueryStringField="cateid" Type="Int32" />
    </SelectParameters>
</asp:ObjectDataSource>
<table width="100%">
    <tr>
        <td>
            <telerik:RadListView ID="RadListView1" runat="server" DataSourceID="odsProductByCate"
                AllowPaging="True" PageSize="15">
                <ItemTemplate>
                    <table id="product">
                        <tr>
                            <td>
                                <div id="com-main-left-box-item">
                                    <div id="com-main-left-box-item-img">
                                        <asp:Image ID="Image1" runat="server" ImageUrl='<%# "~/Image/Upload/"+Eval("Image") %>'
                                            AlternateText='<%# Eval("Name") %>' />
                                        <div id="com-main-left-box-item-content-button-readmore">
                                            <asp:HyperLink ID="hlDetail" runat="server" NavigateUrl='<%# "~/san-pham.aspx?id="+Eval("ID") %>'>Xem chi tiết</asp:HyperLink>
                                        </div>
                                    </div>
                                    <br />
                                </div>
                            </td>
                        </tr>
                    </table>
                </ItemTemplate>
                <EmptyDataTemplate>
                    Dữ liệu đang cập nhật !
                </EmptyDataTemplate>
            </telerik:RadListView>
            <asp:ObjectDataSource ID="odsProductByCate" runat="server" SelectMethod="getByCate"
                TypeName="TTBusiness.ClassDB.clsBSProduct">
                <SelectParameters>
                    <asp:QueryStringParameter DefaultValue="" Name="cate" QueryStringField="cateid" Type="Int32" />
                    <asp:Parameter DefaultValue="true" Name="status" Type="Boolean" />
                    <asp:Parameter DefaultValue="true" Name="visible" Type="Boolean" />
                </SelectParameters>
            </asp:ObjectDataSource>
        </td>
    </tr>
    <tr>
        <td>
            <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
                BorderStyle="None" PageSize="15" BackColor="Transparent">
                <Fields>
                    <telerik:RadDataPagerButtonField FieldType="FirstPrev" />
                    <telerik:RadDataPagerButtonField FieldType="Numeric" />
                    <telerik:RadDataPagerButtonField FieldType="NextLast" />
                    <telerik:RadDataPagerPageSizeField />
                </Fields>
            </telerik:RadDataPager>
        </td>
    </tr>
</table>
